package com.woniu.order.client;

import com.woniu.model.Result;
import com.woniu.order.cliententity.entity.JunkType;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;
import java.util.Set;

@FeignClient(name = "depot-server",path = "/depot")
public interface DepotClient {
    /**
     * 生成入库申请表
     * orderNum:订单号
     */
    @GetMapping("/review/add/{orderNum}")
    @ApiOperation("生成入库申请表")
    Result<?> add(@PathVariable("orderNum") String orderNum);

    /**
     * 根据垃圾id查询垃圾单位
     * String 单位
     */
    @GetMapping("/junkType/getUnitById/{id}")
    @ApiOperation("根据垃圾id查询垃圾单位")
    Result<String> getUnitById(@PathVariable("id") Integer id);
    /**
     * 根据id集合查找垃圾种类
     * list 垃圾种类id集合
     */
    @PostMapping("/junkType/getByIdList")
    @ApiOperation("根据id集合查找垃圾种类")
    Result<List<JunkType>> getByIdList(@RequestBody List<Integer> ids);
}
